<!DOCTYPE html>
<html>
<head>
    <title>用户表</title>
		<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
              <select id="selectType" class="form-control" style="width:auto;display:inline-block;" v-model="selectSearch">
                        <option value="phone" selected >按手机号</option>
                        <option value="userName">按用户名</option>
                        <option value="realName">按真实姓名</option>
              </select>
             
              
        <input type="text" class="form-control" style="width:auto;display:inline-block;"  v-if="selectSearch === 'phone'" placeholder="手机号" v-model="selectSearchVal">
                <input type="text" class="form-control" style="width:auto;display:inline-block;" v-if="selectSearch === 'userName'" placeholder="用户名" v-model="selectSearchVal">
                <input type="text" class="form-control" style="width:auto;display:inline-block;"  v-if="selectSearch === 'realName'" placeholder="真实姓名" v-model="selectSearchVal">
          
         <a class="btn btn-default" @click="query()">查询</a>
			<#if shiro.hasPermission("user:user:save")>
            <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("user:user:update")>
            <a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</#if>
			<#if shiro.hasPermission("user:user:delete")>
            <a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
									
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">手机号</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.phone" placeholder="手机号"/>
                        </div>
                    </div>
						
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">用户昵称</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.userName" placeholder="用户昵称"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">真实姓名</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.realName" placeholder="真实姓名"/>
                        </div>
                    </div>
							  <div class="form-group">
					<div class="col-sm-2 control-label">性别  </div>
					<label class="radio-inline"> <input type="radio" 
						name="sex" value="0" v-model="user.sex" /> 男
					</label> <label class="radio-inline"> <input type="radio"
						name="sex" value="1" v-model="user.sex" checked="checked" /> 女
					</label>
				</div>
							
							 
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">出生日期</div>
                        <div class="col-sm-10">
                           <input type="text" class="form-control layui-input" id="test1" v-model="user.birth"  >
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">年龄</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.age" placeholder="年龄"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">用户头像</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.picImg" placeholder="用户头像"/>
                        </div>
                    </div>
                    <div class="form-group">
					<div class="col-sm-2 control-label">状态  </div>
					<label class="radio-inline"> <input type="radio" 
						name="status" value="0" v-model="user.status" /> 正常
					</label> <label class="radio-inline"> <input type="radio"
						name="status" value="1" v-model="user.status" checked="checked" /> 冻结
					</label>
				</div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">总金额</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.amount" placeholder="总金额"/>
                        </div>
                    </div>
                    <div class="form-group">
					<div class="col-sm-2 control-label">用户类型  </div>
					<label class="radio-inline"> <input type="radio" 
						name="userType" value="0" v-model="user.userType" /> 会员
					</label> <label class="radio-inline"> <input type="radio"
						name="userType" value="1" v-model="user.userType" checked="checked" /> 其他
					</label>
				</div>
											                   
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">注册时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.regeistTime" placeholder="注册时间"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">创建者</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.createBy" placeholder="创建者" readonly="readonly"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">修改时间</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.updateTime" placeholder="修改时间" readonly="readonly"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">修改人</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.updateBy" placeholder="修改人" readonly="readonly"/>
                        </div>
                    </div>
										<!-- 	                    <div class="form-group">
                        <div class="col-sm-2 control-label">身份证正面照</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.idcardFrontImg" placeholder="身份证正面照"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">身份证反面照</div>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" v-model="user.idcardBackImg" placeholder="身份证反面照"/>
                        </div>
                    </div> -->
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>
<script src="${request.contextPath}/statics/plugins/layui/layui.js"></script>


<script src="${request.contextPath}/statics/js/modules/user/user.js?_${.now?long}"></script>
<script>
   layui.use('laydate', function(){
  var laydate = layui.laydate;
  
  //执行一个laydate实例
  laydate.render({
    elem: '#test1' //指定元素
  });
});   
</script>
</body>
</html>